Transient temperature compensation for pressure gauges

ABSTRACT

Disclosed is a system wherein the compensation for temperature effects on a pressure measurement gauge are accomplished by processing the raw pressure measurement signal from the gauge through a linear differential equation to produce a thermally compensated measurement. The linear differential equation expresses the thermally compensated pressure determination as a relation between a derivative of temperature and a derivative of pressure error. The linear differential equation contains several coefficients having constant values, and these constant values are computed by calibrating the pressure gauge in a pressure tank having a known pressure and temperature. When the gauge is later placed in an oil or gas well, the coefficient values are used to obtain the corrected measured pressure from the raw measured pressure received from the gauge.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to application Ser. No. 07/926,096, entitled Transient Temperature Compensation for Pressure Gauges Using an Impulse Response for Gauge Calibration, of Phelps, Cook, and Roszelle, and application Ser. No. 07/926,065, entitled Transient Temperature Compensation for Pressure Gauges Using Discrete Temperature History Measurements for Gauge Calibration, of Phelps, Cook, and Roszelle, filed concurrently herewith.

TECHNICAL FIELD

This invention relates to pressure gauge measurements and more particularly to thermal compensation of pressure gauge measurements. Even more particularly, the invention relates to compensation of measurement errors due to the effects of thermal transients on pressure gauges within an oil or gas well.

BACKGROUND OF THE INVENTION

In the pressure gauge arts, pressure gauges employing precision piezoelectric quartz resonators are known for providing highly accurate pressure determinations. U.S. Pat. No. 3,561,832 issued to Kerrer et al., and assigned to Hewlett-Packard Company, shows a quartz pressure gauge which is created from a single piece of crystalline quartz with the gauge comprising a hollowed cylinder and a circular resonator with electronics thereupon. The cylinder may be oriented with respect to the crystalline access for selected characteristics. By applying a predetermined voltage to the resonator, the resonator may be caused to resonate at a resonance frequency. The application of pressure around the cylinder causes the resonator to change its oscillation frequency, thus by measuring the change in oscillation frequency, the applied pressure may be accurately determined.

While the oscillation frequency of the resonator of the quartz pressure gauge is a function of the applied pressure, it is known that the frequency is also affected by temperature. Thus, in order to provide an exact measure of the applied pressure, the reading must be compensated for temperature changes. One prior art method for eliminating the temperature effect on the pressure measuring gauge is to provide an isolated second reference gauge which is kept at a constant pressure but which is subjected to the same temperature fluctuations as the first gauge. When both gauges have attained thermal equilibrium at the same temperature, the difference in frequencies output by the gauges is directly correlated to the pressure measured by the first gauge.

The above described technique is effective only after both gauges have reached the same temperature equilibrium. It is ineffective when temperature transients occur, since the second gauge is likely to reach equilibrium at a slower rate than the first gauge. This is because the second gauge must be surrounded by some material which protects it from the pressure fluctuations, and this material will also provide some thermal isolation. In addition to thermal transients occurring in the fluid or gas being measured, if the fluid or gas changes pressure, this pressure change may induce an adiabatic temperature change in the gauge that is subject to pressure. The second gauge, however, which is isolated from the pressure change, would not undergo the adiabatic change.

U.S Pat. No. 4,607,530 issued Aug. 26, 1986 to Chow, entitled "Temperature Compensation for Pressure Gauges" discloses one prior art method for compensating for thermal transients. This method relies on the physical construction of the gauge, and upon creating a dynamic model that compensates for the flow of heat through the physical exterior of the gauge to the interior where the pressure is being measured. The method uses a fast responding thermal device on the exterior of the gauge to measure the temperature at the exterior, and uses the model to predict the temperature on the interior of the gauge at the location of the resonator. By calibrating the gauge to provide a known relationship between the frequency of the resonator and the temperature of the resonator, the system then uses the dynamic model to predict the temperature of the resonator based upon the temperature of the fast acting thermal device. Thus, as the temperature around the gauge changes, the model, in combination with the fast responding thermal device, will predict the temperature of the resonator. The resonator temperature can then be used to determine the pressure error due to the temperature.

The method of Chow suffers from the limitation that the dynamic model is based on the construction of the particular gauge being used to perform the measurement. Thus, this method may not easily be adapted to other manufacturer's gauges, or to other types of gauges.

"State-of-the-Art Simultaneous Downhole Flow Rate and Pressure Measurement Equipment" by G. W. Haws and B. L. Knight, published at the 65th Annual Technical Conference and Exhibition of the Society of Petroleum Engineers, Sep. 23, 1990, describes thermally compensating pressure gauges using a differential equation which is a modification of an RC electrical circuit description. "Pressure Gauge specification considerations in Practical Well Testing", by A. F. Veneruso, et al., published at the 66th Annual Technical Conference and Exhibition of the Society of Petroleum Engineers, Oct. 6, 1991, also describes thermal compensation of pressure gauges using a differential equation similar to the Haws and Knight equation. Both these methods are limited in their accuracy.

It is thus apparent that there is a need in the art for an improved method of compensating for transient temperature changes while measuring pressure in an oil or gas well. There is further need in the art for such a method that does not depend upon the physical construction of the gauge used during the measurement. The present invention meets these and other needs.

DISCLOSURE OF INVENTION

It is an aspect of the present invention to provide a method for the thermal compensation of a pressure gauge.

It is another aspect of the invention to provide a method that is based upon calibration data for the gauge.

Yet another aspect of the invention is to provide thermally compensated measurements in a well logging environment.

A still further aspect is to provide such a method that quickly compensates for transient thermal changes.

The above and other aspects of the invention are accomplished in a system wherein the compensation for temperature effects on a pressure measurement gauge are accomplished by processing the raw measurement signal from the gauge through a linear differential equation to produce a thermally compensated measurement, more accurate than the raw measurement. The linear differential equation expresses the thermally compensated pressure determination as a relation between a derivative of temperature and a derivative of pressure error. The linear differential equation contains several coefficients having constant values, and these constant values are computed by calibrating the pressure gauge in a pressure tank having a known pressure and temperature. Since the pressure and temperature within the pressure tank are known, and the reading from the gauge is measured, the coefficients are the only unknown in the calibration equation. Therefore, the values for the coefficients can be determined for the gauge, and when the gauge is later placed in an oil or gas well, the coefficient values are used to obtain the corrected measured pressure from the raw measured pressure received from the gauge.

The thermally compensated measurement can be plotted to show pressure changes with respect to time or depth in a borehole. The measurement can also be used to control flow of fluid or gas from the borehole, thus preventing the pressure from dropping to an unacceptably low value. Also, the measurement can be input to a control system to control the flow and pressure of fluid being injected into adjacent boreholes, in order to prevent excessive pressure buildup in the borehole.

DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of the invention will be better understood by reading the following more particular description of the invention, presented in conjunction with the following drawings,

FIG. 1 shows a block diagram of the calibration system of the present invention;

FIG. 2 shows a block diagram of the pressure gauge of FIG. 1 and illustrates the thermal sensor attached to the gauge;

FIG. 3 shows a chart of the temperature and pressure error from a typical measurement before compensation;

FIG. 4 shows a block diagram of the pressure gauge in use within a well;

FIG. 5 shows a chart of the temperature, pressure error, and corrected pressure in a typical measurement after being compensated by the present invention; and

FIG. 6 shows a block diagram of the pressure gauge being used to control oil flow from a well and to control pressure of injection fluid being injected into an injection well.

BEST MODE FOR CARRYING OUT THE INVENTION

The following description is of the best presently contemplated mode of carrying out the present invention. This description is not to be taken in a limiting sense but is made merely for the purpose of describing the general principles of the invention. The scope of the invention should be determined by referencing the appended claims.

When a pressure gauge is placed in a liquid or gas for the purpose of measuring pressure, for example, when a pressure gauge is placed in an oil or gas well to measure the pressure of the oil or gas therein, the measurement is also affected by the temperature of the gauge performing the pressure measurement. This problem is particularly acute when sudden thermal changes occur, causing the pressure reading to be inaccurate until the entire gauge stabilizes to the new temperature.

The pressure error caused by change in temperature can be modeled by the linear differential equation: ##EQU1##

Where p_(e) is the pressure error, T is temperature, t is time, and the q_(i) 's are functions of temperature. If each q_(i) is approximated by an mth order polynomial, then the model becomes: ##EQU2##

This equation provides the basis for an (n+1)(m+1)-dimensional linear least squares fit. Before this equation can be applied, each of the coefficient values for a_(ij) must be determined.

These coefficients are determined using a calibration method. Calibration can be performed with any set of time, temperature, and pressure error data. A linear least squares fit of the model can be found by several standard methods. The accuracy of the calibration is determined by the amount of data collected, and the temperature range over which this data is collected.

Some numerical processing difficulties can complicate the calibration procedure. If the temperature profile is undifferentiable, or nearly undifferentiable, at any point the pressure error function is also very likely to be undifferentiable at the same points. Since derivatives of both of these functions are required to calibrate the model, numerical errors are introduced when taking the derivatives. These errors can cause the best least squares fit to be unstable when the differential equation is solved. Discontinuities in the specific T(t) provided for calibration may make evaluation of its derivative impossible. Simple ramps, squares, or trapezoidal wave forms are examples of such discontinuous temperature profiles.

To avoid this problem during calibration, both sides of equation 2 above can be integrated. Thus, ##EQU3##

Except for the case of i=0, all of the integrations for j=0 can be performed analytically. If t₁, and t₂ are taken as two closely spaced points at which the functions T and p_(e) are known, then the remaining integration can be approximated by the trapezoid rule. The model then becomes: ##EQU4##

This equation provides another basis, still

(n+1)(m+1)-dimensional, for a linear least squares fit. This basis does not require the derivative of T(t). Since integration is performed analytically on the lowest order terms, the model is more likely to remain stable when applied to undifferentiable functions. The coefficients of a_(ij) found to provide the best fit for this model, are the same coefficients for the model of equation (1) above, since integration is a linear operation.

FIG. 1 shows a block diagram of the system necessary to perform the calibration operation described above. Referring now to FIG. 1, a pressure tank 102 contains the gauge of the present invention 104, a pressure measurement standard gauge 106, and a temperature measurement standard gauge 108. Signals 110, 114, and 112 from these three instruments are connected to a measurement system 116. The measurement system 116 collects the information from the three gauges, converts the raw frequency data into temperature and pressure measurements, and sends these measurement parameters 118 to a processor 120. The processor 120 takes the measurement parameters 118 and the transient temperature equation 124, which is equation (5) described above, and computes the coefficient values 122 for the coefficients a_(ij). Table 1 shows the values for n and m used in calibrating the system of the present invention. As illustrated in Table 1, a value of n=3, m=1, and an integral fit were found to provide the best compensation for temperature.

FIG. 2 shows a block diagram of the gauge 104 of FIG. 1. Referring now to FIG. 2, the gauge 104 contains a pair of crystal pressure sensors 202 and 203 which are connected to crystal electronics 204. Crystal pressure sensor 202 is subject to both temperature and pressure changes, while crystal temperature sensor 203 is isolated from pressure changes and subject to temperature changes only. A description of how the quartz pressure gauge functions may be found in U.S. Pat. No. 3,561,832 issued to Kerrer et al. and assigned to Hewlett Packard Company. On the gauge, and in close proximity to the crystal pressure sensors 202 and 203, a thermal sensor 206 is used to measure the temperature of the surrounding fluid or gas. The thermal sensor 206 is a fast responding thermal temperature sensor to provide a more accurate temperature reading of the surrounding fluid or gas. A pressure signal 208 and the temperature signal 210 are both contained in the gauge signal 110. Prior to performing the transient measurements, the temperature sensor 206 is calibrated, for stable temperature values, to the temperature sensor 108 (FIG. 1).

Although the method of the present invention performs favorably with quartz pressure gauges as described above with respect to FIG. 2, the invention is not so limited. The invention will perform favorably with capacitive type gauges, as well as other types of gauges.

FIG. 3 shows a chart of the temperature and pressure error from a typical measurement prior to such measurement being compensated. This chart was constructed using the apparatus described above with respect to FIG. 1, without applying any compensation to the pressure readings. Referring now to FIG. 3, line 304 shows the temperature as measured by the temperature sensor 108 (FIG. 1) of the pressure tank 102. During the measurement that resulted in the chart of FIG. 3, the pressure within pressure tank 102 was kept constant, and is represented on the chart of FIG. 3 by a pressure error of zero. The line 302 in the chart of FIG. 3 represents the pressure error computed by subtracting the pressure measured by gauge 106 from the pressure measured by gauge 104.

Prior to the time represented by vertical line 306, the temperature of the pressure gauge 104 had stabilized at approximately 280° Fahrenheit and the pressure error is indicated as being zero. That is, once the crystals 202 and 203 (FIG. 2) within the pressure gauge 104 reach the surrounding fluid temperature, the pressure reading of the gauge will be correct and there will be no pressure error. As shown in FIG. 3, after the time represented by the vertical line 306, a temperature step impulse was applied to the pressure tank 102 which caused the temperature to rise rapidly to a temperature near 300° Fahrenheit. When the temperature started to rise, the pressure error also changed in a positive direction resulting in a maximum pressure error of approximately 130 pounds per square inch which occurred at the time represented by vertical line 308. After time 308, the temperature stabilized in the pressure tank 102 and the pressure error slowly came back to zero at the point in time represented by vertical line 310. A temperature step function in the opposite direction was then applied to the pressure tank 102 causing the temperature to rapidly return to a temperature of approximately 280° Fahrenheit. While the temperature was decreasing, the pressure reading indicated by the gauge 104 dropped below the actual pressure, indicating a maximum pressure error of approximately minus 130 pounds per square inch, which was reached at the time represented by vertical line 312. Once the temperature stabilized at approximately 280° Fahrenheit, the pressure error reduced back to zero at the time represented by vertical line 314.

The chart of FIG. 3 indicates that pressure error is related to a change in the temperature surrounding the gauge. This then indicates that pressure error is related to the derivative of the temperature.

FIG. 4 shows a block diagram of the pressure gauge in use within a well. Referring now to FIG. 4, when pressure readings are desired, the gauge 104 is placed within an oil or gas well 402. The measured pressure signal 208 (FIG. 2) and the temperature signal 210 (FIG. 2) are contained within a measured pressure and temperature signal 404 connected between the gauge 104 and a processor 406. The coefficient values 122, which were calculated in the calibration process described above with respect to FIG. 1, are also input to the processor 406. The transient temperature equation 410, which is equation (1) described above, is also input to the processor 406. Using the measured pressure and measured temperature from the signal 404, the coefficient values 122, and the transient temperature equation 410, the processor 406 adjusts the measured pressure from the signal 404 to a corrected measured pressure signal 408. Methods for solving an equation, such as equation (1) described above, on a digital computer are well known in the art.

The corrected measured pressure signal 408 can be used to adjust conditions within the well 402, and it ca also be used as input to a plotter to produce a graph of the pressure in the well with respect to other well parameters.

FIG. 5 shows a chart of the pressure error, pressure adjusted by equation (1), and corrected pressure in a typical measurement after being compensated by the present invention. Referring now to FIG. 5, three pressure error signals are shown. Chart line 504 is the pressure error that results from the measured pressure from the gauge 104. Chart line 506 shows the pressure error as would be predicted by the transient temperature equation 410. Chart line 502 shows the difference between these two signals which is the corrected measured pressure signal 408.

FIG. 6 shows the environment of the gauge of the present invention and illustrates how the gauge could be used to control pressure within a well. Referring now to FIG. 6, a producing well 602 is shown with the gauge 104 contained therein. An exit valve 604 allows the signal 606 from the gauge 104 to exit the well and connect to a control processor 608. When an injection process is being performed, injection fluid is inserted into wells near the producing well to cause the producing well to produce additional product. However, a problem exists if the injection fluid is injected at too high a pressure, or if too much injection fluid is pumped into the injection wells, since this may cause the geological formation to crack. Therefore, pressure at the producing well must be measured and the injection fluid pressure and amounts must be controlled. The present invention can be used to accurately measure the fluid pressure within the producing well, to control the amount of product being taken from the producing well, and to control the amount of injection fluid being pumped into injection wells.

The measured pressure and temperature signal within the signal 606 is processed by the control processor using the method of the present invention. After the corrected measured pressure is computed, this pressure is then used in a control system to control the amount of oil being taken from the production well. A signal 610 sent by the control processor 608 will open or close the flow control valve 612 to allow product to flow from the flow pipe 614. Also, the control processor 608 outputs a second signal 614 to control the amount of injection fluid being pumped into an adjacent injection well 620. The signal 614 is connected to a flow control valve 622 which regulates the amount and pressure of the injection fluid indicated by arrow 624. Thus, the present invention can be used to control oil being taken from a production well, injection fluid being pumped into nearby injection wells, or a combination of the two.

Having thus described a presently preferred embodiment of the present invention, it will now be appreciated that the aspects of the invention have been fully achieved, and it will be understood by those skilled in the art that many changes in construction and widely differing embodiments and applications of the invention will suggest themselves without departing from the spirit and scope of the present invention. The disclosures and the description herein are intended to be illustrative and are not in any sense limiting of the invention, more preferably defined in scope by the following claims.

                  TABLE 1                                                          ______________________________________                                         Fit Type  n     m       Max Psi Error                                                                            % Max Error                                  ______________________________________                                         None      --    --      130.32    100.00                                       Linear    1     0       26.81     20.57                                        Integral  1     0       26.97     20.70                                        Linear    2     0       12.28     9.42                                         Integral  2     0        8.23     6.32                                         Linear    3     0       Unstable                                               Integral  3     0        8.07     6.19                                         Integral  3     1        2.76     2.12                                         ______________________________________                                    

For all larger values of n and m, the least squares fit produces an unstable solution. 

What is claimed is:
 1. A method for thermally compensating the pressure value displayed by a pressure gauge, said method comprising the steps of:(a) determining the coefficient values to a linear differential equation which expresses a thermally compensated pressure value as a relation between a derivative of temperature and a derivative of pressure error; (b) measuring the pressure of the surroundings of which a pressure value is desired with said pressure gauge; (c) measuring the temperature of the immediate environment of said pressure gauge; (d) inputting said pressure measurement and said temperature measurement into a computer system containing said linear differential equation; (e) computing a thermally compensated pressure value using said pressure measurement, said temperature measurement, and said linear differential equation; and (f) displaying said thermally compensated pressure value on a display device.
 2. The method of claim 1 further comprising the steps of:(g) repeating steps (b) through (e) over a period of time; and (h) plotting said thermally compensated pressure value with respect to time on a plotting device.
 3. The method of claim 1 wherein step (a) further comprises the step of:(a1) using ##EQU5## as said linear differential equation wherein p_(e) represents pressure error, T represents temperature, t represents time, and each q_(i) is a function of temperature.
 4. The method of claim 3 wherein step (a1) further comprises:(a2) modifying said linear differential equation by substituting an mth order polynomial for each q_(i) comprising using ##EQU6## as said linear differential equation.
 5. The method of claim 1 wherein said temperature measurement is performed using a thermal sensor in close proximity to said gauge.
 6. The method of claim 1 wherein said gauge is a quartz pressure gauge.
 7. The method of claim 1 wherein said surroundings of which a thermally compensated pressure value is desired is a borehole.
 8. The method of claim 7 further comprising the steps of:(g) transmitting said thermally compensated pressure value to a control system; and (h) controlling flow from said borehole using said control system to limit changes in said thermally compensated pressure value.
 9. The method of claim 7 further comprising the steps of:(g) transmitting said thermally compensated pressure value to a control system; (h) connecting said control system to fluid control valves connected to at least one adjacent borehole; and (i) controlling flow of fluid into said at least one adjacent borehole using said control system to limit said thermally compensated pressure value.
 10. The method of claim 1 wherein step (a) comprises the steps of:(a1) placing said gauge in a constant pressure environment; (a2) allowing said gauge to stabilize to a temperature of said environment; (a3) rapidly changing said temperature within said environment while holding said pressure constant; (a4) determining a pressure error between said pressure measured by said gauge and said constant pressure; and (a5) determining said coefficient values by inputting said pressure error and said temperature into said linear differential equation and solving said linear differential equation for said coefficient values.
 11. A method for thermal compensation of the pressure value displayed by a pressure gauge, said method comprising the steps of:(a) determining the coefficient values to a linear differential equation which expresses a thermally compensated pressure value as a relation between a derivative of temperature and a derivative of pressure error comprising using ##EQU7## as said linear differential equation wherein p_(e) represents pressure error, T represents temperature, t represents time, and each q_(i) is a function of temperature; (b) measuring the pressure of the surroundings of which a pressure value is desired with said pressure gauge; (c) measuring the temperature of the immediate environment of said pressure gauge; (d) inputting said pressure measurement and said temperature measurement into a computer system containing said linear differential equation; (e) computing a thermally compensated pressure value using said pressure measurement, said temperature measurement, and said linear differential equation; and (f) displaying said thermally compensated pressure value on a display device.
 12. The method of claim 11 further comprising the steps of:(g) repeating steps (b) through (e) over a period of time; and (h) plotting said thermally compensated pressure value with respect to time on a plotting device.
 13. The method of claim 11 wherein step (a) further comprises:(a1) modifying said linear differential equation by substituting an mth order polynomial for each q_(i) comprising using ##EQU8## as said linear differential equation.
 14. The method of claim 11 wherein said temperature measurement is performed using a thermal sensor in close proximity to said gauge.
 15. The method of claim 11 wherein said gauge is a quartz pressure gauge.
 16. The method of claim 11 wherein said surroundings of which a thermally compensated pressure determination is desired is a borehole.
 17. The method of claim 16 further comprising the steps of:(g) transmitting said thermally compensated pressure value to a control system; and (h) controlling flow from said borehole using said control system to limit changes in said thermally compensated pressure value.
 18. The method of claim 16 further comprising the steps of:(g) transmitting said thermally compensated pressure value to a control system; (h) connecting said control system to fluid control valves connected to at least one adjacent borehole; and (i) controlling flow of fluid into said at least one adjacent borehole using said control system to limit said thermally compensated pressure value.
 19. The method of claim 11 wherein step (a) comprises the steps of:(a1) placing said gauge in a constant pressure environment; (a2) allowing said gauge to stabilize to a temperature of said environment; (a3) rapidly changing said temperature within said environment while holding said pressure constant; (a4) determining a pressure error between said pressure measured by said gauge and said constant pressure; and (a5) determining said coefficient values by inputting said pressure error and said temperature into said linear differential equation and solving said linear differential equation for said coefficient values.
 20. A method for thermal compensation of the pressure value made by a pressure gauge within a borehole, said method comprising the steps of:(a) determining the coefficient values to a linear differential equation which expresses a thermally compensated pressure value as a relation between a derivative of temperature and a derivative of pressure error comprising using ##EQU9## as said linear differential equation wherein p_(e) represents pressure error, T represents temperature, t represents time, and each q_(i) is a function of temperature; (b) placing said pressure gauge in said borehole; (c) measuring the pressure within said borehole with said pressure gauge; (d) measuring the temperature of the immediate area of said borehole surrounding said pressure gauge; (e) inputting said pressure measurement and said temperature measurement into a computer system containing said linear differential equation; (f) computing said thermally compensated pressure value using said pressure measurement, said temperature measurement, and said linear differential equation; (g) transmitting said thermally compensated pressure value to a control system; (h) connecting said control system to fluid control valves connected to at least one adjacent borehole; and (i) controlling flow of fluid into said at least one adjacent borehole using said control system to limit said thermally compensated pressure value. 